﻿@import "Hawksoft.mixins.less";

.s-Dialog, .s-Panel {
    line-height: normal;
}

.s-Panel {
    background-color: #fff;
}

.panel-titlebar-close {
    margin-right: 5px;
    border: none;
    float: left;
    background-color: transparent;
    width: 36px;
}

.panel-titlebar-close, .ui-dialog.mobile-layout .ui-dialog-titlebar-close, .ui-dialog.mobile-layout .ui-dialog-titlebar-close:hover {
    background: url() no-repeat center center;
}

.s-Dialog .ui-tabs, .s-Panel .ui-tabs {
    padding: 0;
    background: transparent;
}

.s-Dialog .ui-tabs .ui-tabs-nav li a, .s-Panel .ui-tabs .ui-tabs-nav li a {
    padding: 2px 10px 3px 10px;
}

.s-Dialog .ui-dialog-buttonpane, .s-Panel .ui-dialog-buttonpane {
    margin: 0px;
    padding: 2px 7px 2px 3px;
}

.s-Dialog .tab-pane, s.-Panel .tab-pane {
    overflow: hidden;
    background-color: #fff;
}

.s-Dialog .s-DialogToolbar {
    margin: 0;
    background: #f8fafc;
    border-radius: 0;
    border: none;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #d0d0d0;
    padding: 5px 4px 0 4px;
    min-height: 44px;
}

.s-Panel .s-DataGrid.editor {
    border: 1px solid #eee;
}

.s-Panel .s-DataGrid.editor .grid-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e7e7e7;
    padding: 5px 4px 5px 4px;
    min-height: 43px;
    margin-bottom: 0;
}

.full-height-page section.content {
    display: flex;
    flex-direction: column;
}

div.s-Toolbar .tool-button.no-text span.button-inner {
    padding: 5px 3px 19px 13px;
}

div.s-Toolbar .s-PopupToolButton .button-outer > span > b {
    margin-top: 2px;
}


.s-Dialog .s-Form {
    padding: 12px 12px 0 12px;
}

.s-MessageDialog {
    min-width: 310px;
}

.s-MessageDialog .message {
    padding: 24px 6px 6px 86px;
    min-height: 80px;
    color: #fff;
    background-repeat: no-repeat;
    background-position: 16px 16px;
    background-color: transparent;
    font-size: 13px;
    font-weight: bold;
    white-space: pre-wrap;
}

.s-AlertDialog .ui-dialog-content {
    .gradient(#c43c35, #ee5f5b, #c43c35);
}

.s-AlertDialog .message {
    background-image: url(images/dialog-alert.png);
}

.s-WarningDialog .ui-dialog-content {
    .gradient(#a4a435, #aaaa5b, #a4a435);
}

.s-WarningDialog .message {
    background-image: url(images/dialog-warning.png);
}

.s-ConfirmDialog .ui-dialog-content {
    .gradient(#353cc4, #5b5fee, #353cc4);
}

.s-ConfirmDialog .message {
    background-image: url(images/dialog-confirm.png);
}

.s-InformationDialog .ui-dialog-content {
    .gradient(#4ba94f, #5ba35f, #4ba94f);
}

.s-InformationDialog .message {
    background-image: url(images/dialog-confirm.png);
}

.s-Form .translation > label.caption, .translation > label.caption {
    color: darkviolet;
}

.flex-layout {
    .s-Form .editor { float: initial; }
    .s-Form .caption { float: initial; }
    .s-Form .vx { float: initial; }

    .field { .display(flex); .flex-wrap(nowrap); .align-items(flex-start); .flex(0, 1, 100%); min-width: 0; }
    .caption { .flex(0, 0, auto); }

    .editor { float: initial; .flex(1, 1, 80%); min-width: 0; }
    input.editor[type=checkbox] { .flex(0, 0, auto); }
    .s-DateTimeEditor.dateQ { .flex(1, 1, 50%); }
    .s-DateTimeEditor.time { .flex(0, 0, auto); margin-left: 4px; }

    .s-EmailEditor.emailuser { .flex(1, 1, 50%); }
    .s-DateTimeEditor.emaildomain { .flex(0, 0, auto); margin-left: 4px; }

    .vx { .flex(0, 0, auto); }

    .category { .display(flex); .flex-wrap(wrap); .flex-direction(row); }
    .category-links { .flex(0, 0, auto); }
    .category-title { .flex(0, 1, 100%); }

    &.s-Panel,
    .ui-dialog-content, 
    .s-DialogContent, 
    .s-Form, 
    form,
    .fieldset,
    .ui-tabs-panel,
    .ui-tabs-panel > .s-DataGrid,
    .property-panes,
    .property-panes .tab-pane.active,
    .s-PropertyGrid {
        .display(flex);
        .flex-direction(column);
        .flex(1, 1, auto);
    }

    .grid-container {
        .flex(1, 1, auto);
    }

    .s-PropertyGrid .categories {
        .flex(1, 1, auto);
        //overflow-y: auto;
    }

    @media (max-width: 760px) {
        .field { .flex-wrap(wrap); }
        .select2-container { .flex(1); }
        .caption { .flex(0, 0, 100%); width: auto; }
        .s-Form .caption { text-align: left; padding-top: 0px; padding-bottom: 2px; }
        .s-PropertyGrid .category-title { padding: 3px 0; margin: 12px 10px 8px 0; }
    }

    .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
        &.field { .flex(0, 1, auto); }
    }

    @media (min-width: 768px) {
        .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
            &.field { .flex(0, 1, auto); }
        }
    }

	@media (min-width: 992px) {
	    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
            &.field { .flex(0, 1, auto); }
        }
	}
	
    @media (min-width: 1200px) {
        .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
            &.field { .flex(0, 1, auto); }
        }
    }
}

body.mobile-device.modal-dialog-open {
    overflow-y: hidden;
}

.ui-dialog.mobile-layout {
    box-shadow: none;
    border: none;

    .ui-dialog-titlebar {
        border: none;
        padding-left: 2px;
    }

    .ui-dialog-titlebar-close {
        width: 44px;
        order: -1;
        transition: none;

        i {
            display: none;
        }
    }

    .ui-dialog-titlebar-maximize, .ui-dialog-titlebar-restore {
        display: none;
    }

    .s-PropertyGrid .categories {
        //overflow-y: scroll;
    }
}

.panel-hidden {
    display: none !important;
}